package com.zzzy.doc.vo.notify;

import com.zzzy.common.vo.PageParam;
import com.zzzy.framework.common.annotation.RangeValuesCheck;
import com.zzzy.framework.common.enums.common.NotifyMessageStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

@Data
public class DocNotifyMessagePageReq extends PageParam {

    @Schema(description = "消息内容")
    @Length(max = 100, message = "消息内容不能超过100个字符")
    private String message;

    @Schema(description = "状态：未读、已读")
    @RangeValuesCheck(enumValueRange = NotifyMessageStatusEnum.class, allowBlank = true, message = "消息状态错误")
    private String status;

    @Schema(description = "提醒开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate beginTime;

    @Schema(description = "提醒结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endTime;

}
